/* eslint-disable */
import request from "@/router/axios";

const date = `${new Date().getFullYear()}${String(
  new Date().getMonth()
).padStart(2, "0")}`;
const day = `${new Date().getFullYear()}${String(
  new Date().getMonth() + 1
).padStart(2, "0")}${String(new Date().getDate() - 1).padStart(2, "0")}`;

// 获取项目日报信息
export const rptVisPrjManageDaily = projectCode =>
  request({
    url: "/chief/rptVisPrjManageDaily/getByProjectCode?portalLoading",
    method: "get",
    params: {
      projectCode,
      date: day
    }
  });

// 获取经营数据信息
export const rptVisPrjManage = projectCode =>
  request({
    url: "/chief/rptVisPrjManage/getByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取项目概况
export const rptVisPrjbasic = projectCode =>
  request({
    url: "/chief/rptVisPrjbasic/getByProjectCode",
    method: "get",
    params: {
      projectCode
    }
  });

// 获取各采煤完成情况
export const RptVisPrjCaimeistatus = projectCode =>
  request({
    url: "/chief/RptVisPrjCaimeistatus/getCaimeiByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取融资情况
export const rptVisPrjRzstatus = projectCode =>
  request({
    url: "/chief/rptVisPrjRzstatus/getRzstatusByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取投入产出情况
export const rptVisPrjInoutput = projectCode =>
  request({
    url: "/chief/rptVisPrjInoutput/getOutputByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取产品成本情况
export const rptVisPrjProductcost = projectCode =>
  request({
    url: "/chief/rptVisPrjProductcost/getProdcostByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取产品成本饼图信息
export const rptVisPrjProductcost2 = projectCode =>
  request({
    url: "/chief/rptVisPrjProductcost2/getByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取投资回报情况
export const rptVisPrjInreturn = projectCode =>
  request({
    url: "/chief/rptVisPrjInreturn/getInreturnByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取其它事项
export const rptVisPrjOtheritem = projectCode =>
  request({
    url: "/chief/rptVisPrjOtheritem/getOtheritemByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取节点完成情况
export const rptVisPrjNodefinish = projectCode =>
  request({
    url: "/chief/rptVisPrjNodefinish/getNodeFinishByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取法律诉讼情况
export const rptVisPrjLawstatus = projectCode =>
  request({
    url: "/chief/rptVisPrjLawstatus/getLawstatusByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取业务指标
export const getYw = projectCode =>
  request({
    url: "/chief/rptVisPrjPerformance/getYw",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取财务指标
export const getCw = projectCode =>
  request({
    url: "/chief/rptVisPrjPerformance/getCw",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取工程节点完成情况
export const rptVisPrjEngnodefinish = projectCode =>
  request({
    url: "/chief/rptVisPrjEngnodefinish/getEngnodefinishByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取工程成本对账
export const rptVisPrjCostRec = projectCode =>
  request({
    url: "/chief/rptVisPrjCostRec/getNodeFinishByProjectCode",
    method: "get",
    params: {
      projectCode,
      date
    }
  });

// 获取应付应收对账单信息
// type   1: 应收  2: 应付
export const rptVisPrjRecpayAccount = (projectCode, type = 1) =>
  request({
    url: "/chief/rptVisPrjRecpayAccount/getByProjectCode",
    method: "get",
    params: {
      projectCode,
      date,
      type
    }
  });

// 获取当前登录人个人结算信息
export const rptVisPrjPersonitem = typeCode =>
  request({
    url: "/chief/rptVisPrjPersonitem/getList",
    method: "get",
    params: {
      typeCode
    }
  });

// 获取当前登录人分配任务
export const getBiTaskDataVByAssigner = () =>
  request({
    url: "/chief/biTaskDataV/getBiTaskDataVByAssigner",
    method: "get"
  });

// 获取当前登录人监督任务
export const getBiTaskDataVByAuditor = () =>
  request({
    url: "/chief/biTaskDataV/getBiTaskDataVByAuditor",
    method: "get"
  });

// 获取当前登录人承办任务
export const getBiTaskDataVByPrincipal = () =>
  request({
    url: "/chief/biTaskDataV/getBiTaskDataVByPrincipal",
    method: "get"
  });

// 获取门户列表
export const getWorkMenu = systemName =>
  request({
    url: "/admin/menu/rootMenuBySystemName",
    method: "get",
    params: {
      systemName
    }
  });

// 获取单点系统
export const SysAuthSystem = systemName =>
  request({
    url: "/admin/SysAuthSystem/page",
    method: "get"
  });
